Brush for warping and water reflection effects

ABSTRACT

A method and computer program product for generating a warping effect in an image having a plurality of regions, each associated with a distortion vector. The method includes defining a path segment vector in response to user movement of a brush cursor; modifying one or more distortion vectors having originations covered by the cursor based on the path segment vector; and repeating defining and modifying to produce a warping effect.

BACKGROUND

[0001] The present invention relates to computer-implemented methods for brushbased warping including causing reflection effects in an image.

[0002] Computer painting programs allow the user to manipulate an electronic image with an onscreen “brush” controlled by an input device such as a mouse. One such program is Goo, available from MetaTools, Inc., 6303 Carpinteria Ave., Carpinteria, Calif., 93013.

[0003] The user may typically select from among a variety of brush shapes, e.g., circle, square, or single pixel. The user drags the brush along a “trajectory” from one location to another within the image, thereby defining an “envelope.” Pixels within the envelope are affected by the operation of the brush.

[0004] One type of brush allows a user to “paint” colors and textures into the envelope. The paintbrush replaces the pixels in the envelope with the image of the brush Another type of brush allows the user to “move” portions of the image within the envelope, creating a warping effect. For example, a “sticky” brush moves pixels from the staring point of the envelope to its end. A “slipping” brush moves the pixels from the starting point a distance less than, but proportional to, the length of the trajectory. Other warping brush effects are bloat, pucker, and twirl.

SUMMARY OF THE INVENTION

[0005] In general, in one aspect, the invention features a method and computer program product for generating a warping effect in an image having a plurality of regions, each associated with a distortion vector. The method includes defining a path segment vector in response to user movement of a brush cursor; modifying one or more distortion vectors having originations covered by the cursor based on the path segment vector; and repeating defining and modifying to produce a warping effect.

[0006] Particular implementations can include one or more of the following features.

[0007] The method includes sampling a source image using the distortion vectors to produce a destination image.

[0008] Each distortion vector ends at a mesh point in a distortion mesh, and modifying distortion vectors includes multiplying the path segment vector by a predetermined matrix thereby producing a product vector; interpolating each distortion vector between mesh points that surround the end of the product vector, thereby producing an interpolated vector; and combining the product vector and the interpolated vector.

[0009] The direction of the path segment vector is opposite to the direction of movement of the brush cursor.

[0010] Multiplying can cause the magnitude of the product vector to be substantially twice the magnitude of the path segment vector.

[0011] Multiplying can cause the direction of the product vector to differ from the direction of the path segment vector by substantially 90 degrees.

[0012] The interpolation for the distortion vector can be linear, bilinear or of higher order.

[0013] Defining includes defining a plurality of path segment vectors in response to user manipulation of a brush cursor, wherein the magnitude of each path segment vector depends on its location within the brush cursor; and modifying includes modifying a distortion vector using the nearest path segment vector.

[0014] The method includes dividing the image into a frozen area and a unfrozen area by a boundary in response to user input; moving the cursor from the frozen area into the unfrozen area in response to user input; and modifying the distortion vectors in the unfrozen region covered by the cursor to produce a reflection effect based on a portion of the frozen area.

[0015] The distortion vectors form a distortion vector field, and the method includes generating one or more further distortion vector fields; modifying each distortion vector field using a different time-varying function; combining the resulting distortion vector fields to produce a time-varying distortion vector field; and repeatedly sampling the source image using the time-varying distortion vector field to produce an image having an animated image. The sum of the time-varying functions is one at any given time.

[0016] Each of the time-varying functions is continuous.

[0017] Advantages that can be seen in implementations of the invention include one or more of the following. A mirror brush is provided that creates a reflection effect in an image. The reflection effect is warped to look like a reflection on a water surface with waves. The warped reflection effect can also be animated with very little processing expense to produce an animated water reflection effect. An artist can move the brush to produce different types of waves. To the artist, effect feels like “painting the waves” on which the image is reflected.

[0018] The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below. Other features and advantages of the invention will become apparent from the description, the drawings, and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Like reference numbers and designations in the various drawings indicate like elements.

[0020]FIG. 1 graphically depicts a process for generating a destination image.

[0021]FIG. 2 depicts a process for producing a destination image by sampling or simply mapping from a source image plane to a color space.

[0022]FIG. 3 presents a side view of the source plane and destination planes.

[0023]FIG. 4A depicts a distortion in a “state of stability” for 2 mesh points, for a forward warping brush.

[0024]FIG. 4B depicts a distortion in a “state of stability” for 3 mesh points, for a mirror brush.

[0025]FIG. 4C depicts a distortion in a “state of stability” for 7 mesh points, for a mirror brush.

[0026]FIG. 5 presents an image resulting from the use of the warping mirror brush on an image.

[0027]FIG. 6 is a flowchart depicting a process that generates a warping effect.

[0028]FIG. 7 is a flowchart of a process for creating an animated reflection.

DETAILED DESCRIPTION

[0029]FIG. 1 graphically depicts a process for generating a destination image. A destination image 106 is associated with a distortion vector field 104. The vector field 104 includes a plurality of distortion vectors 112. Each distortion vector 112 begins at a destination mesh point 110 and ends at a source mesh point 114.

[0030] Each destination mesh point 110 is associated with a region in the destination image. The destination mesh points 110 collectively form a destination mesh 116. Each source mesh point 114 is associated with a region in the source image. The source mesh points 114 collectively form a distortion mesh 118. The distortion vector field 104 is used to sample from regions in the source image to generate regions in destination image 106. Each region in the source and destination image contains one or more pixels.

[0031] In one implementation, sampling includes simply copying the pixels from regions in the source image to regions in the destination image according to the distortion vectors. In another implementation, sampling includes applying a predetermined weight function to the pixels copied. In FIG. 1, each vector 110 points toward the upper left of its mesh point. Therefore, the objects in the source image appear to have moved toward the lower right in the destination image.

[0032] In one implementation the mesh is repeatedly updated as the brush moves over the image. This implementation is now described in detail.

[0033] Referring to FIG. 2, a destination image is produced by sampling or simply mapping from the source image plane 204 to a color space 202. While this implementation is described in terms of image planes, the image can be defined on any sort of surface, such as a sphere, cylinder, and the like. When a user first applies a warping brush to the source image, he intends to create a deformation W of the source plane to a first destination plane 208, where W is a set of distortion vectors describing the forward mapping. The system implements the warping as an inverse mapping w from the first destination plane to the source plane. When the user applies the warping brush a second time, the user intends a mapping V from the first destination plane to a second destination plane 210. The system implements the warping as an inverse mapping v. Further applications of the warping brush are handled in a similar manner, using further destination planes and inverse mappings. Mappings w and v can be implemented as distortion meshes, as described above.

[0034] Inverse mapping w is represented as a vector w=(I,q) at each point (x,y) of the first destination plane, where p and q are the horizontal and vertical components of w, respectively. Then w is represented as:

w=(p(x,y),q(x,y))

[0035] Inverse mapping v is represented as a “path segment vector” v=(v_(x), v_(y)) at each point (x,y) of the second destination plane, where v_(x) and v_(y) are the horizontal and vertical components of v, respectively. The direction of the path segment vector is opposite to the direction of movement of the brush cursor.

[0036] The system concatenates mappings v and w in the following manner. FIG. 3 presents a side view, sighted along the x-axis, of the source plane and destination planes. Vector v maps from a point (x,y) in the second destination plane to a point (x+v_(x), y+v_(y)) in the first destination plane. Vector w maps from a point (x,y) in the first destination plane to a point (x+p, y+q) in the source plane. The coordinate (x,y) is the location of a mesh point. FIG. 3 depicts the general case where vector v does not end at a mesh point.

[0037] Because vector v does not end at the mesh point where w is defined, the system interpolates to generate a vector w′ that originates from the point (x+v_(x), y+v_(y)) between the mesh points in the first destination plane and describes the distortion at that point. The interpolation for the distortion vector can be linear, bilinear, or of higher order.

[0038] In general, the vector w′ is approximated by a Taylor series expansion in two variables (x,y). $\begin{matrix} \begin{matrix} {w^{\prime} = {w\left( {{x + v_{x}},{x + v_{y}}} \right)}} \\ {= {{w\left( {x,y} \right)} + {\frac{\partial{w\left( {x,y} \right)}}{\partial x}v_{x}} + {\frac{\partial{w\left( {x,y} \right)}}{\partial y}v_{y}} + {\frac{\partial^{2}w}{{\partial x}{\partial y}}v_{x}v_{y}} +}} \\ {{{\frac{\partial^{2}w}{\partial x^{2}}\frac{v_{x}^{2}}{2}} + {\frac{\partial^{2}w}{\partial y^{2}}\frac{v_{y}^{2}}{2}} + {\frac{\partial^{3}w}{\partial x^{3}}\frac{v_{x}^{3}}{6}} + {\frac{\partial^{3}w}{{\partial x^{2}}{\partial y}}\frac{v_{x}^{2}v_{y}}{2}} +}} \\ {{{\frac{\partial^{3}w}{{\partial x}{\partial y^{2}}}\frac{v_{x}v_{y}^{2}}{2}} + {\frac{\partial^{3}w}{\partial y^{3}}\frac{v_{y}^{3}}{6}} + \ldots}} \end{matrix} & (1) \end{matrix}$

[0039] In one embodiment, the mesh points form squares, and so the mesh points are separated horizontally by a, and vertically by a. In other implementations, the mesh points can form rectangles, or can be arranged in more complex way. The Taylor series can be approximated up to the first order as $\begin{matrix} {w^{\prime} = {w + {\frac{{w\left( {{x + a},y} \right)} - {w\left( {x,y} \right)}}{a}v_{x}} + {\frac{{w\left( {x,{y + a}} \right)} - {w\left( {x,y} \right)}}{a}v_{y}}}} & (2) \end{matrix}$

[0040] Then the total distortion (p′, q′) is given by $\begin{matrix} {p^{\prime} = {v_{x} + p + {\frac{{p\left( {{x + a},y} \right)} - p}{a}v_{x}} + {\frac{{p\left( {x,{y + a}} \right)} - p}{a}v_{y}}}} & (3) \\ {q^{\prime} = {v_{y} + q + {\frac{{q\left( {{x + a},y} \right)} - q}{a}v_{x}} + {\frac{{q\left( {x,{y + a}} \right)} - q}{a}v_{y}}}} & (4) \end{matrix}$

[0041] A better quality can be achieved at the expense of speed if more than linear in v terms are used (in the above Taylor expansion). For example by adding the next term in (1), $\frac{\partial^{2}w}{{\partial x}{\partial y}}v_{x}v_{y}$

[0042] we get bilinear interpolation. By adding further terms in the Taylor series, we get higher order interpolations.

[0043] The corresponding expressions involve more than two mesh points because of the higher derivatives, and are apparent to those skilled in the art. Also, other interpolation methods can be used and there is a wealth of literature on the subject. See for example G. Wolberg, “Digital Image Warping”, chapter 5, for an approach focused on antialiasing.

[0044] As the user moves the brush, the movement of the brush is regularly sampled. For example, the movement can be sampled every {fraction (1/30)}^(th) of a second. As each sample is taken, a path segment vector is generated. For example, a vector w is generated during the first sample, and a vector v is defined during a second sample. The system then concatenates vectors v and w, as described above to produce a new vector w, which will be concatenated with a vector generated during the next sample. The process repeats in this manner for each sample.

[0045] Each brush stroke comprises a plurality of tiny brush movements, each referred to as a “sample.” For each sample, a plurality of path segment vectors (referred to as a “path segment vector field”) is generated. The path segment vector field is used to modify the distortion vector field. This process is repeated for each sample to produce a continuous effect.

[0046] The process of generating a path segment vector field for a sample is now described according to one implementation. A path segment vector is generated at each mesh point under the brush cursor. The direction of a path segment vector is opposite to the direction of movement of the brush cursor during the sample associated with that path segment vector.

[0047] The brush can have a brush pressure that is constant or varying. Brush pressure describes the way in which the strength of an effect induced by a brush varies within the area affected by the brush. A brush having an effect of constant strength is said to have constant brush pressure. A brush having an effect of varying strength is said to have varying brush pressure. One example of a brush having varying brush pressure is a warping brush. One type of warping brush induces a stronger brush effect near its center and a weaker effect near its edges. Brush pressure can be implemented by basing the magnitude of the path segment vectors on their location within the brush cursor.

[0048] As described above, a slipping brush “moves the pixels” from its starting point a distance less than, but proportional to, the length of its envelope. A slipping brush having a warping effect could move pixels near the center of the envelope further than pixels near the edge of the envelope. This is so because the vectors v are multiplied by the brush pressure, which is different at different points in the cursor. For example, the brush pressure can be 1 at the center of the brush, and smoothly go down to zero at the edges of the brush.

[0049] The system limits the effect of each brush sample stroke. In one implementation, the effect of each stroke is limited to the size of a mesh tile. A mesh tile is the area between four adjacent mesh points. Consequently, the increments added to w at each brush stroke are limited in size. The x- and y-components of vector w are kept smaller than a. After repeated brushing over one area, the distortion in that area reaches a state of stability, as described below. From the user's point of view we get a smear which looks like a small area that gets stretched and greatly magnified in the direction of brushing. In terms of inverse mappings, the reason for this is that all of the distortion vectors in a line along the direction of brushing are sampling from the same pixel. Next this effect is described in more detail.

[0050] In a matrix representation equations (3) and (4) become $\begin{matrix} {\begin{pmatrix} p \\ q \end{pmatrix}_{new} = {\begin{pmatrix} p \\ q \end{pmatrix}_{old} + {\begin{pmatrix} {1 + \frac{{p\left( {{x + a},y} \right)} - p}{a}} & \frac{{p\left( {x,{y + a}} \right)} - p}{a} \\ \frac{{q\left( {{x + a},y} \right)} - q}{a} & {1 + \frac{{q\left( {x,{y + a}} \right)} - q}{a}} \end{pmatrix}\begin{pmatrix} v_{x} \\ v_{y} \end{pmatrix}}}} & (5) \end{matrix}$

[0051] We define a new coordinate system x′,y′ such that the x′ axis is opposite in direction to the direction of the brush stroke and the y′ axis is perpendicular to the brush stroke in the plane of the image. Now q′=0 and v_(y′)=0. Then equation (5) becomes (omitting the prime (′) notation everywhere) $\begin{matrix} {\begin{pmatrix} p \\ 0 \end{pmatrix}_{new} = {\begin{pmatrix} p \\ 0 \end{pmatrix}_{old} + {\begin{pmatrix} {1 + \frac{{p\left( {{x + a},y} \right)} - p}{a}} & \frac{{p\left( {x,{y + a}} \right)} - p}{a} \\ 0 & 1 \end{pmatrix}\begin{pmatrix} v_{x} \\ 0 \end{pmatrix}}}} & (6) \end{matrix}$

[0052] Because the brushing is opposite to x, v_(x)>0, each brush stroke sample adds a little to p. Assuming an initial state of w(x+a,y)=0, equation (6) becomes $\begin{matrix} {p_{new} = {p + {\left( {1 - \frac{p}{a}} \right)v_{x}}}} & (7) \end{matrix}$

[0053] Let dp=p_(new)−p and dv=v_(x). The system accumulates small distortions dp into a total distortion p $\begin{matrix} {{dp} = {\left( {1 - \frac{p}{a}} \right){dv}}} & (8) \end{matrix}$

[0054] Here the sum of all samples of brush movements dv is v and the current p=p(v). Equation (8) has a solution $\begin{matrix} {p = {a\left( {1 - ^{- \frac{v}{a}}} \right)}} & (9) \end{matrix}$

[0055] From equation (9) we see that, as the user continues brushing at one single mesh point, p approaches the magnitude of the distance a to the next mesh point, but never exceeds a, and a state of stability is thus reached. In a similar manner, it can be shown that p will approach a for any mesh point. Therefore, the difference in distortion between two adjacent mesh points in the state of stability is equal to the distance between the mesh points. We see that p=a in the limit FIG. 4A depicts this situation. A vector p extending from a mesh point x to a mesh point x+a, thereby implementing the forward warping effect described above.

[0056] For this reason, all of the distortion vectors in a line along the direction of brushing sample from the same pixel. This implements a forward warping brush. The forward warping brush includes two variations: a slipping brush and a sticky brush. The sticky brush is described above. The slipping brush is similar to the sticky brush, but each distortion is multiplied by a constant less than 1.

[0057] Forward Mirror Brush

[0058] One equation for a forward warping brush is given above as equation (5). In one implementation, a modification of the above technique is used to create a mirror reflection brush. The system described above is changed so that in Equation (5) “1” is replaced by “2” to yield: $\begin{matrix} {\begin{pmatrix} p \\ q \end{pmatrix}_{new} = {\begin{pmatrix} p \\ q \end{pmatrix}_{old} + {\begin{pmatrix} {2 + \frac{{p\left( {{x + a},y} \right)} - p}{a}} & \frac{{p\left( {x,{y + a}} \right)} - p}{a} \\ \frac{{q\left( {{x + a},y} \right)} - q}{a} & {2 + \frac{{q\left( {x,{y + a}} \right)} - q}{a}} \end{pmatrix}\begin{pmatrix} v_{x} \\ v_{y} \end{pmatrix}}}} & (10) \end{matrix}$

[0059] Equation (8) then becomes $\begin{matrix} {{dp} = {\left( {2 - \frac{p}{a}} \right){dv}}} & (11) \end{matrix}$

[0060] Here the sum of all sample vectors dv is v and the current p=p(v). Equation (11) has a solution $\begin{matrix} {p = {a\left( {2 - ^{- \frac{v}{a}}} \right)}} & (12) \end{matrix}$

[0061] From equation (12) we see that, as the user continues brushing at one single mesh point, p approaches the magnitude of twice the distance a to the next mesh point, but never exceeds 2a, and a state of stability is thus reached. In a similar manner, it can be shown that the difference between the magnitudes of adjacent vectors having same direction will approach 2a.

[0062]FIG. 4B depicts a vector p extending from a mesh point x to a mesh point x+2a, thereby implementing a reflection effect about mesh point x+a. We see that p=2a in the limit. FIG. 4C depicts a vector p beginning from a mesh point x−a and a vector p₁ beginning from an adjacent mesh point x−2a. We see that p₁=p+2a, thereby implementing a reflection effect about mesh point x+a.

[0063] Other effects can be attained by using other coefficients, A, B, C, D, which need not be integers. Equation (10) can be generalized as shown by: $\begin{matrix} {\begin{pmatrix} p \\ q \end{pmatrix}_{new} = {\begin{pmatrix} p \\ q \end{pmatrix}_{old} + {\left( {\begin{pmatrix} A & B \\ C & D \end{pmatrix} + \begin{pmatrix} \frac{{p\left( {{x + a},y} \right)} - p}{a} & \frac{{p\left( {x,{y + a}} \right)} - p}{a} \\ \frac{{q\left( {{x + a},y} \right)} - q}{a} & \frac{{q\left( {x,{y + a}} \right)} - q}{a} \end{pmatrix}} \right)\begin{pmatrix} v_{x} \\ v_{y} \end{pmatrix}}}} & (13) \end{matrix}$

[0064] The mirror effect discussed above is attained using $\begin{matrix} {\begin{pmatrix} A & B \\ C & D \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}} & (14) \end{matrix}$

[0065] A perfect vertical mirror effect can be attained by eliminating the horizontal components, for example $\begin{matrix} {\begin{pmatrix} A & B \\ C & D \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 2 \end{pmatrix}} & (15) \end{matrix}$

[0066] Just stretching of the image by a certain amount can be achieved by equation (14) where “2” is replaced by a number less than 1.

[0067] To achieve a more clearly defined reflection effect, in one implementation for each sample we execute the above calculation two or more times. This produces faster and better-defined saturation and stabilization into the mirror state.

[0068] Other warping effects are achieved by selecting other values for A, B, C and D.

[0069]FIG. 5 presents an image 504 resulting from the use of the warping mirror brush on an image 502. A user has designated the upper portion of image 502 as a frozen area and the lower portion of the image as an unfrozen area, and has used the warping mirror brush to create a warped reflection of the frozen area into the unfrozen area. As is apparent in image 504, the warping mirror brush can be used advantageously to create waves, producing a water reflection effect. If desired, a user can use a smoothing brush to remove the waves. For example, the smoothing brush can provide a simple blur of the mesh.

[0070] In one implementation a straight-line boundary is established, dividing the image into a frozen region and an unfrozen region. Distortion vectors in the frozen area are undisturbed by the reflection process, while mesh points vectors in the unfrozen area may be modified by the process. Brushing from the frozen area to the unfrozen area produces an interesting water reflection effect. Brushing perpendicular to the boundary produces a mirror-like effect, while brushing at an angle to the boundary produces a different artistic effect. The boundary to the frozen area is used as a starting point for the above process of modifying the distortion mesh.

[0071] Left Mirror Brush

[0072] The process of modifying a distortion vector for a sample for a “left mirror brush” is now described. A path segment vector is generated at each mesh point under the brush cursor. The coefficients of the matrix in equation (14) are chosen to rotate the path segment vector by 90 degrees. Each resulting product vector has a direction perpendicular to the direction of movement of the brush, and to the right of the movement of the brush. The length of the vector is determined by the displacement of the brush since the last sample. This brush “displaces pixels” to the left of the brush to produce an interesting effect.

[0073] Using this brush with the above mirroring engine produces a reflection perpendicular to the movement of the brush and to the left of the direction of brush movement. This brush is useful because there is no need to define frozen and unfrozen regions, and the reflection effect can be produced by consecutive, parallel, overlapping brush strokes.

[0074]FIG. 6 is a flowchart depicting a process 600. The process generates a warping effect in an image having a plurality of regions, where each region is associated with a distortion vector. The process defines a path segment vector in response to user manipulation of a brush cursor (step 602). The process then modifies one or more distortion vectors (the vector field) having originations covered by the cursor based on the path segment vector(step 604). As described above, each distortion vector has an origination at a destination mesh point 110. These steps are repeated as the brush moves to produce a warping effect. The above modification process is represented on FIG. 3 and related text.

[0075]FIG. 7 is a flowchart of a process 700 for creating an animated reflection. A user manipulates a mirror brush to create two different distortion vector fields describing two non identical reflection effects from the same source image (step 702). Each distortion vector field can be created using process 600, described above.

[0076] The process applies a different time-varying function to each distortion vector field to create two distortion vector fields (step 704). For example, a sin²(t) function can be multiplied by the magnitudes of the distortion vectors for one distortion vector field, and a cos²(t) function can be applied to the magnitudes of the distortion vectors for the other distortion vector field. Of course, other time-varying functions can be used. However, they should sum up to 1, at least approximately.

[0077] The process combines the distortion vector fields to create a time-varying distortion vector field (step 706). For example, the vector magnitudes of the time-varying distortion vector fields can be summed for corresponding distortion vectors.

[0078] The process samples the source image using the time-varying distortion vector field to create a destination image (step 708). The sampling process is described above.

[0079] Process 700 can be varied in many ways. For example, more than two distortion vector fields can be combined to create the time-varying distortion vector field. The coefficients should still sum up to 1, at least approximately. As another example, time-varying distortion vector fields can be combined with nontime-varying distortion vector fields. Each of the above-described variations of process 700 creates an animated reflection effect. When a warping mirror brush is used to create one of the updated meshes, an animated water reflection effect is produced.

[0080] The invention can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. Apparatus of the invention can be implemented in a computer program product tangibly embodied in a machine-readable storage device for execution by a programmable processor; and method steps of the invention can be performed by a programmable processor executing a program of instructions to perform functions of the invention by operating on input data and generating output. The invention can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. Each computer program can be implemented in a high-level procedural or object-oriented programming language, or in assembly or machine language if desired; and in any case, the language can be a compiled or interpreted language. Suitable processors include, by way of example, both general and special purpose microprocessors. Generally, a processor will receive instructions and data from a read-only memory and/or a random access memory. Generally, a computer will include one or more mass storage devices for storing data files; such devices include magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM disks. Any of the foregoing can be supplemented by, or incorporated in, ASICs (application-specific integrated circuits).

[0081] To provide for interaction with a user, the invention can be implemented on a computer system having a display device such as a monitor or LCD screen for displaying information to the user and a keyboard and a pointing device such as a mouse or a trackball by which the user can provide input to the computer system. The computer system can be programmed to provide a graphical user interface through which computer programs interact with users.

[0082] The invention has been described in terms of particular embodiments. Other embodiments are within the scope of the following claims. For example, the steps of the invention can be performed in a different order and still achieve desirable results. 

1-26. (Cancelled)
 27. A computer program product, tangibly embodied in an information carrier, comprising instructions operable to cause data processing equipment to: receive a user input specifying a movement in a graphical user interface of a brush cursor over a source image, the source image having a plurality of regions, each region being associated with a distortion vector that has an end point in the region; modify each distortion vector having an end point that is under the brush cursor during the movement, the distortion vector being modified according to a direction of movement of the brush cursor; and modify the source image using the distortion vectors to produce a destination image having a warping effect.
 28. The computer program product of claim 27, further comprising instructions operable to cause the data processing apparatus to: repeat the modification of the distortion vectors and the modification of the source image in response to receiving additional user input specifying additional movement of the brush cursor.
 29. The computer program product of claim 27, wherein the instructions to modify each distortion vector are operable to cause the data processing apparatus to: sample the movement of the brush cursor to generate a series of brush applications and for each brush application and each distortion vector having an end point under the brush cursor at the brush application, generate a path segment vector, the direction of each path segment vector corresponding to the direction of the brush cursor at the brush application; and modify the distortion vectors using the path segment vectors.
 30. The computer program product of claim 29, wherein the direction and the movement of the brush cursor are sampled at regular intervals.
 31. The computer program product of claim 29, wherein the direction and the movement of the brush cursor are sampled at {fraction (1/30)} second intervals.
 32. The computer program product of claim 29, wherein each path segment vector has a magnitude determined by a corresponding speed of the movement of the brush cursor.
 33. The computer program product of claim 32, wherein the instructions to generate the path segment vectors are operable to cause the data processing apparatus to: scale the magnitude of each path segment vector by a scaling factor.
 34. The computer program product of claim 33, wherein the scaling factor is a fraction less than one.
 35. The computer program product of claim 29, wherein the brush cursor has associated brush pressure values that determine a strength of the brush cursor at each region of the source image covered by the brush cursor and the instructions to generate the path segment vectors are operable to cause the data processing apparatus to: generate path segment vectors for each region having a magnitude determined by the strength of the brush cursor for the region.
 36. The computer program product of claim 35, wherein the brush cursor has uniform brush pressure.
 37. The computer program product of claim 35, wherein the brush cursor has non-uniform brush pressure.
 38. A method comprising: receiving a user input specifying a movement in a graphical user interface of a brush cursor over a source image, the source image having a plurality of regions, each region being associated with a distortion vector that has an end point in the region; modifying each distortion vector having an end point that is under the brush cursor during the movement, the distortion vector being modified according to a direction of movement of the brush cursor; and modifying the source image using the distortion vectors to produce a destination image having a warping effect.
 39. The method of claim 38, wherein modifying each distortion vector comprises: sampling the movement of the brush cursor to generate a series of brush applications and for each brush application and each distortion vector having an end point under the brush cursor at the brush application, generate a path segment vector, the direction of each path segment vector corresponding to the direction of the brush cursor at the brush application; and modifying the distortion vectors using the path segment vectors. 